package com.github.cyf.upload.local.pojo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.web.multipart.MultipartFile;

/**
 * @author chenyifan
 * @create 2025-05-22 17:19
 */
@NoArgsConstructor
@AllArgsConstructor
@Builder
@Data
@ApiModel(value = "上传文件需要用的基本参数")
public class UploadFileParam {

    @ApiModelProperty(value = "总分片数量", example = "0", required = true)
    private Integer chunks;

    @ApiModelProperty(value = "分片大小", example = "0", required = true)
    private Long chunkSize;

    @ApiModelProperty(value = "当前为第几块分片", example = "0", required = true)
    private Integer chunk;

    @ApiModelProperty(value = "当前文件的分片对象", required = true)
    private MultipartFile file;

    @ApiModelProperty(value = "当前文件的MD5,不是分片的", required = true)
    private String md5;

    @ApiModelProperty(value = "当前文件名称", required = true)
    private String name;
}